package sz.szsmk.citizencard.mvp.presenter;

import javax.inject.Inject;

import sz.szsmk.citizencard.model.network.GsdxNetApi;
import sz.szsmk.citizencard.mvp.contract.IBusHomeSiteContact;
import sz.szsmk.citizencard.retrofitrxjava.NetworkDateSources;

/**
 * Copyright (c)2018
 * author: zdh
 * created on: 2018/11/15 9:52
 * description:
 */
public class BusHomeSitePresenter extends IBasePresenter
implements IBusHomeSiteContact.IBusHomeSitePresenter<IBusHomeSiteContact.IBusHomeSiteView> {


    private NetworkDateSources mNetworkDateSource;
    GsdxNetApi gsdxNetApi;

    @Inject
    public BusHomeSitePresenter(GsdxNetApi gsdxNetApi) {
        this.gsdxNetApi = gsdxNetApi;

        this.mNetworkDateSource = NetworkDateSources.getInstance();
    }

    @Override
    public void getSearchList(String s, String keyword) {
//        QueryNearStandbyReq queryNearStandbyReq = new QueryNearStandbyReq();
//        queryNearStandbyReq.setLatitude(s);
//        queryNearStandbyReq.setLongitude(keyword);
//        queryNearStandbyReq.setUserID("string");
//        mNetworkDateSource.queryNearStandby(queryNearStandbyReq, new SubscribeResult<QueryNearStandbyRes>() {
//            @Override
//            protected void onOk(QueryNearStandbyRes response) {
//                String json = new Gson().toJson(response);
//                L.e(Constant.TAG,"------------"+json);
//                ((IBusHomeSiteContact.IBusHomeSiteView) mView).getSearchListSucc(response);
//            }
//
//            @Override
//            protected void onFailure(QueryNearStandbyRes response) {
//                super.onFailure(response);
//            }
//        }, new ErrorAction() {
//            @Override
//            public void onCall(Throwable throwable) {
//
//            }
//        });
    }
}
